<!DOCTYPE html>  
<html>  
<head>  
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />  
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
    <title>Baidu Map </title>  
    <style type="text/css">  
        html{height:100%}  
        body{height:100%;margin:0px;padding:0px}  
        #container{height:100%}  
        #allmap {
            width: 100%;
            height: 100%;
            overflow: hidden;
            margin: 0;
            font-family: "微软雅黑";
        }
    </style> 
     <script type="text/javascript"
     src="http://api.map.baidu.com/api?type=webgl&v=1.0&ak=VHYqgkmedOCoMq0MymDs8b7Z23kNxcQB"></script>
      
</head>  
<body>

<div id="container">

</div>
</body>  
<script>
 
// var map = new BMapGL.Map("container");      
// map.centerAndZoom(new BMapGL.Point(117.162349, 36.987651), 11);      
// // 创建地理编码实例      
// var myGeo = new BMapGL.Geocoder();      
// // 根据坐标得到地址描述    
// myGeo.getLocation(new BMapGL.Point(117.162349, 36.987651), function(result){      
//     if (result){      
//       alert(result.address);      
//     }      
// });
  
var map = new BMapGL.Map('container');

//创建地址解析器实例
var myGeo = new BMapGL.Geocoder();
// 将地址解析结果显示在地图上，并调整地图视野
myGeo.getPoint('山东省济南市济阳区安顺街6号', function(point){
    if(point){
        map.centerAndZoom(point, 16);
        map.addOverlay(new BMapGL.Marker(point, {title: '山东省济南市济阳区安顺街6号'}))
    }else{
        alert('您选择的地址没有解析到结果！');
    }
}, '济南市')


</script>

</html>

 